package com.smitish.vueblog.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smitish.vueblog.entity.Follow;
import com.smitish.vueblog.mapper.FollowMapper;
import com.smitish.vueblog.service.FollowService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.smitish.vueblog.vo.UserFollowerVO;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 关注表 服务实现类
 * </p>
 *
 * @author Smitish
 * @since 2020-12-07
 */
@Service
public class FollowServiceImpl extends ServiceImpl<FollowMapper, Follow> implements FollowService {


    @Override
    public Page<UserFollowerVO> getUserFansList(Page<UserFollowerVO> page, Long id) {
        return page.setRecords(this.baseMapper.getUserFans(page, id));
    }

    @Override
    public Page<UserFollowerVO> getUserFollower(Page<UserFollowerVO> page, Long id) {
        return page.setRecords(this.baseMapper.getUserFollower(page, id));
    }
}
